home *** CD-ROM | disk | FTP | other *** search
- (defun C:StartClock ()
- (prompt "Starting Timer Now !")
- (setq DateT1 (getvar "date"))
- (terpri))
-
- (defun C:StopClock ()
- (setq DateT2 (getvar "date"))
- (prompt "Stoping Timer Now !")
- (terpri))
-
- (defun C:ReadClock ()
- (prompt "Timing Recorded (Sec) ")
- (WriteClock nil)
- (terpri))
-
- (defun WriteClock (File)
- (if File (princ (* 86400.0 (- DateT2 DateT1)) File)
- (princ (* 86400.0 (- DateT2
- DateT1)))))
-
- (defun C:BM1 ( / Time Loop DateT1 DateT2)
- (prompt "ADSI ACAD-BenchMark #1 Vers 1.0 = ")
- (prompt "(while (< X 100) (setq X (1+ X)))")
- (terpri)
- (setq loop 0
- Time 0.0)
- (while (< loop 8)
- (gc)
- (setq X 0
- Loop (1+ Loop))
- (setq DateT1 (getvar "date"))
- (while (< X 100) (setq X (1+ X)))
- (setq DateT2 (getvar "date"))
- (setq Time (+ Time (* 86400.0 (- DateT2
- DateT1)))))
- (prompt "Time = (Sec.) ")
- (princ (/ Time 5.0))
- (terpri))
-
- (defun C:BM2 ( / Time Loop DateT1 DateT2)
- (prompt "ADSI ACAD-BenchMark #2 Vers 1.0 = ")
- (prompt "Regen / Redraw")
- (terpri)
- (setq Time 0.0)
- (gc)
- (setq DateT1 (getvar "date"))
- (redraw)
- (setq DateT2 (getvar "date"))
- (textscr)
- (prompt "Redraw Time = (Sec.) ")
- (princ (* 86400.0 (- DateT2 DateT1)))
- (terpri)
- (gc)
- (setq DateT1 (getvar "date"))
- (command "regen")
- (setq DateT2 (getvar "date"))
- (textscr)
- (prompt "Regen Time = (Sec.) ")
- (princ (* 86400.0 (- DateT2 DateT1)))
- (terpri)
- )
- (defun C:BM3 ( / Line DateT1 DateT2)
- (prompt "ADSI ACAD-BenchMark #3 Vers 1.0 = ")
- (prompt "Sequential File Access ")
- (terpri)
- (setq Time 0.0)
- (gc)
- (setq DateT1 (getvar "date"))
- (setq Line "")
- ;
- (setq Infile (open "ADSITEST.INF" "r"))
- (setq Outfile (open "ADSITEST.OUT" "w"))
- (while Line
- (setq Line (read-line InFile))
- (gc) ; Required to circumvent bug in ACAD 2.52
- (if Line (write-line Line Outfile)))
- (setq Infile (close Infile))
- (setq Outfile (close Outfile))
- ;
- (setq DateT2 (getvar "date"))
- (prompt " Time = (Sec.) ")
- (princ (* 86400.0 (- DateT2 DateT1)))
- (terpri)
- (gc)
- )
- (defun C:BM4 ( / Line DateT1 DateT2)
- (prompt "ADSI ACAD-BenchMark #4 Vers 1.0 = ")
- (prompt "Sequential File Read ")
- (terpri)
- (setq Time 0.0)
- (gc)
- (setq DateT1 (getvar "date"))
- (setq Line "")
- ;
- (setq Infile (open "ADSITEST.INF" "r"))
- (while Line
- (setq Line (read-line InFile))
- (gc)); Required to circumvent bug in ACAD 2.52
- (setq Infile (close Infile))
- ;
- (setq DateT2 (getvar "date"))
- (prompt " Time = (Sec.) ")
- (princ (* 86400.0 (- DateT2 DateT1)))
- (terpri)
- (gc)
- )